<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>SFML - Simple and Fast Multimedia Library</title>
        <meta http-equiv="Content-Type" content="text/html;"/>
        <meta charset="utf-8"/>
        <!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
        <link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
        <script type="text/javascript" src="jquery.js"></script>
        <script type="text/javascript" src="dynsections.js"></script>
        <link rel="stylesheet" type="text/css" href="search/search.css" />
        <link rel="stylesheet" type="text/css" href="searchOverrides.css" />
        <script type="text/javascript" src="search/searchdata.js"></script>
        <script type="text/javascript" src="search/search.js"></script>
        <script type="text/javascript">
        /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
          $(document).ready(function() { init_search(); });
        /* @license-end */
        </script>
    </head>
    <body>
        <div id="banner-container">
            <div id="banner">
                <span id="sfml">SFML 2.6.1</span>
            </div>
        </div>
        <div id="content">
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_c0a853e81d6f1c1f0a3eb7a27dc24256.html">SFML</a></li><li class="navelem"><a class="el" href="dir_dd49ddb3ba8035e4a328f8c5f31cda7e.html">Audio</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">SoundStream.hpp</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment">//</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment">// SFML - Simple and Fast Multimedia Library</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment">// Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org)</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment">//</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment">// This software is provided &#39;as-is&#39;, without any express or implied warranty.</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment">// In no event will the authors be held liable for any damages arising from the use of this software.</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment">//</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment">// Permission is granted to anyone to use this software for any purpose,</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="comment">// including commercial applications, and to alter it and redistribute it freely,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="comment">// subject to the following restrictions:</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="comment">//</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="comment">// 1. The origin of this software must not be misrepresented;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="comment">//    you must not claim that you wrote the original software.</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="comment">//    If you use this software in a product, an acknowledgment</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="comment">//    in the product documentation would be appreciated but is not required.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="comment">// 2. Altered source versions must be plainly marked as such,</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="comment">//    and must not be misrepresented as being the original software.</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span><span class="comment">//</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="comment">// 3. This notice may not be removed or altered from any source distribution.</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="comment">//</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="comment"></span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span><span class="preprocessor">#ifndef SFML_SOUNDSTREAM_HPP</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="preprocessor">#define SFML_SOUNDSTREAM_HPP</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span><span class="comment">// Headers</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span><span class="comment"></span><span class="preprocessor">#include &lt;SFML/Audio/Export.hpp&gt;</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span><span class="preprocessor">#include &lt;SFML/Audio/SoundSource.hpp&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span><span class="preprocessor">#include &lt;SFML/System/Thread.hpp&gt;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span><span class="preprocessor">#include &lt;SFML/System/Time.hpp&gt;</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span><span class="preprocessor">#include &lt;SFML/System/Mutex.hpp&gt;</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span><span class="preprocessor">#include &lt;cstdlib&gt;</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span> </div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span><span class="keyword">namespace </span>sf</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span>{</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"><a class="line" href="classsf_1_1SoundStream.html">   45</a></span><span class="keyword">class </span>SFML_AUDIO_API <a class="code hl_class" href="classsf_1_1SoundStream.html">SoundStream</a> : <span class="keyword">public</span> <a class="code hl_class" href="classsf_1_1SoundSource.html">SoundSource</a></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>{</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span> </div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"><a class="line" href="structsf_1_1SoundStream_1_1Chunk.html">   53</a></span>    <span class="keyword">struct </span><a class="code hl_struct" href="structsf_1_1SoundStream_1_1Chunk.html">Chunk</a></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>    {</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="structsf_1_1SoundStream_1_1Chunk.html#aa3b84d69adbe663a17a7671626076df4">   55</a></span>        <span class="keyword">const</span> Int16* <a class="code hl_variable" href="structsf_1_1SoundStream_1_1Chunk.html#aa3b84d69adbe663a17a7671626076df4">samples</a>;     </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="structsf_1_1SoundStream_1_1Chunk.html#af47f5d94012acf8b11f056ba77aff97a">   56</a></span>        std::size_t  <a class="code hl_variable" href="structsf_1_1SoundStream_1_1Chunk.html#af47f5d94012acf8b11f056ba77aff97a">sampleCount</a>; </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span>    };</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span> </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"><a class="line" href="classsf_1_1SoundStream.html#a1fafb9f1ca572d23d7d6a17921860d85">   63</a></span>    <span class="keyword">virtual</span> <a class="code hl_function" href="classsf_1_1SoundStream.html#a1fafb9f1ca572d23d7d6a17921860d85">~SoundStream</a>();</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="classsf_1_1SoundStream.html#afdc08b69cab5f243d9324940a85a1144">   77</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classsf_1_1SoundStream.html#afdc08b69cab5f243d9324940a85a1144">play</a>();</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span> </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"><a class="line" href="classsf_1_1SoundStream.html#a932ff181e661503cad288b4bb6fe45ca">   88</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classsf_1_1SoundStream.html#a932ff181e661503cad288b4bb6fe45ca">pause</a>();</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span> </div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"><a class="line" href="classsf_1_1SoundStream.html#a16cc6a0404b32e42c4dce184bb94d0f4">  100</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classsf_1_1SoundStream.html#a16cc6a0404b32e42c4dce184bb94d0f4">stop</a>();</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span> </div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"><a class="line" href="classsf_1_1SoundStream.html#a1f70933912dd9498f4dc99feefed27f3">  110</a></span>    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code hl_function" href="classsf_1_1SoundStream.html#a1f70933912dd9498f4dc99feefed27f3">getChannelCount</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span> </div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"><a class="line" href="classsf_1_1SoundStream.html#a7da448dc40d81a33b8dc555fbf0d3fbf">  121</a></span>    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code hl_function" href="classsf_1_1SoundStream.html#a7da448dc40d81a33b8dc555fbf0d3fbf">getSampleRate</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno">  122</span> </div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"><a class="line" href="classsf_1_1SoundStream.html#a64a8193ed728da37c115c65de015849f">  129</a></span>    <a class="code hl_enumeration" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03">Status</a> <a class="code hl_function" href="classsf_1_1SoundStream.html#a64a8193ed728da37c115c65de015849f">getStatus</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span> </div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"><a class="line" href="classsf_1_1SoundStream.html#af416a5f84c8750d2acb9821d78bc8646">  144</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classsf_1_1SoundStream.html#af416a5f84c8750d2acb9821d78bc8646">setPlayingOffset</a>(<a class="code hl_class" href="classsf_1_1Time.html">Time</a> timeOffset);</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span> </div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"><a class="line" href="classsf_1_1SoundStream.html#ae288f3c72edbad9cc7ee938ce5b907c1">  154</a></span>    <a class="code hl_class" href="classsf_1_1Time.html">Time</a> <a class="code hl_function" href="classsf_1_1SoundStream.html#ae288f3c72edbad9cc7ee938ce5b907c1">getPlayingOffset</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span> </div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"><a class="line" href="classsf_1_1SoundStream.html#a43fade018ffba7e4f847a9f00b353f3d">  169</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classsf_1_1SoundStream.html#a43fade018ffba7e4f847a9f00b353f3d">setLoop</a>(<span class="keywordtype">bool</span> loop);</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno">  170</span> </div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"><a class="line" href="classsf_1_1SoundStream.html#a49d263f9bbaefec4b019bd05fda59b25">  179</a></span>    <span class="keywordtype">bool</span> <a class="code hl_function" href="classsf_1_1SoundStream.html#a49d263f9bbaefec4b019bd05fda59b25">getLoop</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span> </div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno">  181</span><span class="keyword">protected</span>:</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno">  182</span> </div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno">  183</span>    <span class="keyword">enum</span></div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno">  184</span>    {</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno">  185</span>        NoLoop = -1 </div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"><a class="line" href="classsf_1_1SoundStream.html#a7707214e7cd4ffcf1c123e7bcab4092aa2f2c638731fdff0d6fe4e3e82b6f6146">  186</a></span>    };</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno">  187</span> </div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"><a class="line" href="classsf_1_1SoundStream.html#a769d08f4c3c6b4340ef3a838329d2e5c">  194</a></span>    <a class="code hl_function" href="classsf_1_1SoundStream.html#a769d08f4c3c6b4340ef3a838329d2e5c">SoundStream</a>();</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno">  195</span> </div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"><a class="line" href="classsf_1_1SoundStream.html#a9c351711198ee1aa77c2fefd3ced4d2c">  210</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classsf_1_1SoundStream.html#a9c351711198ee1aa77c2fefd3ced4d2c">initialize</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channelCount, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate);</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno">  211</span> </div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"><a class="line" href="classsf_1_1SoundStream.html#a968ec024a6e45490962c8a1121cb7c5f">  229</a></span>    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classsf_1_1SoundStream.html#a968ec024a6e45490962c8a1121cb7c5f">onGetData</a>(<a class="code hl_struct" href="structsf_1_1SoundStream_1_1Chunk.html">Chunk</a>&amp; data) = 0;</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno">  230</span> </div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"><a class="line" href="classsf_1_1SoundStream.html#a907036dd2ca7d3af5ead316e54b75997">  240</a></span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classsf_1_1SoundStream.html#a907036dd2ca7d3af5ead316e54b75997">onSeek</a>(<a class="code hl_class" href="classsf_1_1Time.html">Time</a> timeOffset) = 0;</div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno">  241</span> </div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"><a class="line" href="classsf_1_1SoundStream.html#a3f717d18846f261fc375d71d6c7e41da">  252</a></span>    <span class="keyword">virtual</span> Int64 <a class="code hl_function" href="classsf_1_1SoundStream.html#a3f717d18846f261fc375d71d6c7e41da">onLoop</a>();</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno">  253</span> </div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"><a class="line" href="classsf_1_1SoundStream.html#a3a38d317279163f3766da2e538fbde93">  266</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classsf_1_1SoundStream.html#a3a38d317279163f3766da2e538fbde93">setProcessingInterval</a>(<a class="code hl_class" href="classsf_1_1Time.html">Time</a> interval);</div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno">  267</span> </div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno">  268</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno">  269</span> </div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno">  277</span>    <span class="keywordtype">void</span> streamData();</div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno">  278</span> </div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno">  293</span>    <span class="keywordtype">bool</span> fillAndPushBuffer(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bufferNum, <span class="keywordtype">bool</span> immediateLoop = <span class="keyword">false</span>);</div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno">  294</span> </div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno">  304</span>    <span class="keywordtype">bool</span> fillQueue();</div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno">  305</span> </div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno">  312</span>    <span class="keywordtype">void</span> clearQueue();</div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno">  313</span> </div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno">  314</span>    <span class="keyword">enum</span></div>
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno">  315</span>    {</div>
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno">  316</span>        BufferCount = 3,    </div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno">  317</span>        BufferRetries = 2   </div>
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno">  318</span>    };</div>
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno">  319</span> </div>
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno">  321</span>    <span class="comment">// Member data</span></div>
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno">  323</span><span class="comment"></span>    <a class="code hl_class" href="classsf_1_1Thread.html">Thread</a>        m_thread;                   </div>
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno">  324</span>    <span class="keyword">mutable</span> <a class="code hl_class" href="classsf_1_1Mutex.html">Mutex</a> m_threadMutex;              </div>
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno">  325</span>    Status        m_threadStartState;         </div>
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno">  326</span>    <span class="keywordtype">bool</span>          m_isStreaming;              </div>
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno">  327</span>    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>  m_buffers[BufferCount];     </div>
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno">  328</span>    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>  m_channelCount;             </div>
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno">  329</span>    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>  m_sampleRate;               </div>
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno">  330</span>    Int32         m_format;                   </div>
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno">  331</span>    <span class="keywordtype">bool</span>          m_loop;                     </div>
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno">  332</span>    Uint64        m_samplesProcessed;         </div>
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno">  333</span>    Int64         m_bufferSeeks[BufferCount]; </div>
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno">  334</span>    <a class="code hl_class" href="classsf_1_1Time.html">Time</a>          m_processingInterval;       </div>
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno">  335</span>};</div>
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno">  336</span> </div>
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno">  337</span>} <span class="comment">// namespace sf</span></div>
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno">  338</span> </div>
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno">  339</span> </div>
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno">  340</span><span class="preprocessor">#endif </span><span class="comment">// SFML_SOUNDSTREAM_HPP</span></div>
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno">  341</span> </div>
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno">  342</span> </div>
<div class="ttc" id="aclasssf_1_1Mutex_html"><div class="ttname"><a href="classsf_1_1Mutex.html">sf::Mutex</a></div><div class="ttdoc">Blocks concurrent access to shared resources from multiple threads.</div><div class="ttdef"><b>Definition</b> <a href="Mutex_8hpp_source.html#l00047">Mutex.hpp:48</a></div></div>
<div class="ttc" id="aclasssf_1_1SoundSource_html"><div class="ttname"><a href="classsf_1_1SoundSource.html">sf::SoundSource</a></div><div class="ttdoc">Base class defining a sound's properties.</div><div class="ttdef"><b>Definition</b> <a href="SoundSource_8hpp_source.html#l00042">SoundSource.hpp:43</a></div></div>
<div class="ttc" id="aclasssf_1_1SoundSource_html_ac43af72c98c077500b239bc75b812f03"><div class="ttname"><a href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03">sf::SoundSource::Status</a></div><div class="ttdeci">Status</div><div class="ttdoc">Enumeration of the sound source states.</div><div class="ttdef"><b>Definition</b> <a href="SoundSource_8hpp_source.html#l00050">SoundSource.hpp:51</a></div></div>
<div class="ttc" id="aclasssf_1_1SoundStream_html"><div class="ttname"><a href="classsf_1_1SoundStream.html">sf::SoundStream</a></div><div class="ttdoc">Abstract base class for streamed audio sources.</div><div class="ttdef"><b>Definition</b> <a href="SoundStream_8hpp_source.html#l00045">SoundStream.hpp:46</a></div></div>
<div class="ttc" id="aclasssf_1_1SoundStream_html_a16cc6a0404b32e42c4dce184bb94d0f4"><div class="ttname"><a href="classsf_1_1SoundStream.html#a16cc6a0404b32e42c4dce184bb94d0f4">sf::SoundStream::stop</a></div><div class="ttdeci">void stop()</div><div class="ttdoc">Stop playing the audio stream.</div></div>
<div class="ttc" id="aclasssf_1_1SoundStream_html_a1f70933912dd9498f4dc99feefed27f3"><div class="ttname"><a href="classsf_1_1SoundStream.html#a1f70933912dd9498f4dc99feefed27f3">sf::SoundStream::getChannelCount</a></div><div class="ttdeci">unsigned int getChannelCount() const</div><div class="ttdoc">Return the number of channels of the stream.</div></div>
<div class="ttc" id="aclasssf_1_1SoundStream_html_a1fafb9f1ca572d23d7d6a17921860d85"><div class="ttname"><a href="classsf_1_1SoundStream.html#a1fafb9f1ca572d23d7d6a17921860d85">sf::SoundStream::~SoundStream</a></div><div class="ttdeci">virtual ~SoundStream()</div><div class="ttdoc">Destructor.</div></div>
<div class="ttc" id="aclasssf_1_1SoundStream_html_a3a38d317279163f3766da2e538fbde93"><div class="ttname"><a href="classsf_1_1SoundStream.html#a3a38d317279163f3766da2e538fbde93">sf::SoundStream::setProcessingInterval</a></div><div class="ttdeci">void setProcessingInterval(Time interval)</div><div class="ttdoc">Set the processing interval.</div></div>
<div class="ttc" id="aclasssf_1_1SoundStream_html_a3f717d18846f261fc375d71d6c7e41da"><div class="ttname"><a href="classsf_1_1SoundStream.html#a3f717d18846f261fc375d71d6c7e41da">sf::SoundStream::onLoop</a></div><div class="ttdeci">virtual Int64 onLoop()</div><div class="ttdoc">Change the current playing position in the stream source to the beginning of the loop.</div></div>
<div class="ttc" id="aclasssf_1_1SoundStream_html_a43fade018ffba7e4f847a9f00b353f3d"><div class="ttname"><a href="classsf_1_1SoundStream.html#a43fade018ffba7e4f847a9f00b353f3d">sf::SoundStream::setLoop</a></div><div class="ttdeci">void setLoop(bool loop)</div><div class="ttdoc">Set whether or not the stream should loop after reaching the end.</div></div>
<div class="ttc" id="aclasssf_1_1SoundStream_html_a49d263f9bbaefec4b019bd05fda59b25"><div class="ttname"><a href="classsf_1_1SoundStream.html#a49d263f9bbaefec4b019bd05fda59b25">sf::SoundStream::getLoop</a></div><div class="ttdeci">bool getLoop() const</div><div class="ttdoc">Tell whether or not the stream is in loop mode.</div></div>
<div class="ttc" id="aclasssf_1_1SoundStream_html_a64a8193ed728da37c115c65de015849f"><div class="ttname"><a href="classsf_1_1SoundStream.html#a64a8193ed728da37c115c65de015849f">sf::SoundStream::getStatus</a></div><div class="ttdeci">Status getStatus() const</div><div class="ttdoc">Get the current status of the stream (stopped, paused, playing)</div></div>
<div class="ttc" id="aclasssf_1_1SoundStream_html_a769d08f4c3c6b4340ef3a838329d2e5c"><div class="ttname"><a href="classsf_1_1SoundStream.html#a769d08f4c3c6b4340ef3a838329d2e5c">sf::SoundStream::SoundStream</a></div><div class="ttdeci">SoundStream()</div><div class="ttdoc">Default constructor.</div></div>
<div class="ttc" id="aclasssf_1_1SoundStream_html_a7da448dc40d81a33b8dc555fbf0d3fbf"><div class="ttname"><a href="classsf_1_1SoundStream.html#a7da448dc40d81a33b8dc555fbf0d3fbf">sf::SoundStream::getSampleRate</a></div><div class="ttdeci">unsigned int getSampleRate() const</div><div class="ttdoc">Get the stream sample rate of the stream.</div></div>
<div class="ttc" id="aclasssf_1_1SoundStream_html_a907036dd2ca7d3af5ead316e54b75997"><div class="ttname"><a href="classsf_1_1SoundStream.html#a907036dd2ca7d3af5ead316e54b75997">sf::SoundStream::onSeek</a></div><div class="ttdeci">virtual void onSeek(Time timeOffset)=0</div><div class="ttdoc">Change the current playing position in the stream source.</div></div>
<div class="ttc" id="aclasssf_1_1SoundStream_html_a932ff181e661503cad288b4bb6fe45ca"><div class="ttname"><a href="classsf_1_1SoundStream.html#a932ff181e661503cad288b4bb6fe45ca">sf::SoundStream::pause</a></div><div class="ttdeci">void pause()</div><div class="ttdoc">Pause the audio stream.</div></div>
<div class="ttc" id="aclasssf_1_1SoundStream_html_a968ec024a6e45490962c8a1121cb7c5f"><div class="ttname"><a href="classsf_1_1SoundStream.html#a968ec024a6e45490962c8a1121cb7c5f">sf::SoundStream::onGetData</a></div><div class="ttdeci">virtual bool onGetData(Chunk &amp;data)=0</div><div class="ttdoc">Request a new chunk of audio samples from the stream source.</div></div>
<div class="ttc" id="aclasssf_1_1SoundStream_html_a9c351711198ee1aa77c2fefd3ced4d2c"><div class="ttname"><a href="classsf_1_1SoundStream.html#a9c351711198ee1aa77c2fefd3ced4d2c">sf::SoundStream::initialize</a></div><div class="ttdeci">void initialize(unsigned int channelCount, unsigned int sampleRate)</div><div class="ttdoc">Define the audio stream parameters.</div></div>
<div class="ttc" id="aclasssf_1_1SoundStream_html_ae288f3c72edbad9cc7ee938ce5b907c1"><div class="ttname"><a href="classsf_1_1SoundStream.html#ae288f3c72edbad9cc7ee938ce5b907c1">sf::SoundStream::getPlayingOffset</a></div><div class="ttdeci">Time getPlayingOffset() const</div><div class="ttdoc">Get the current playing position of the stream.</div></div>
<div class="ttc" id="aclasssf_1_1SoundStream_html_af416a5f84c8750d2acb9821d78bc8646"><div class="ttname"><a href="classsf_1_1SoundStream.html#af416a5f84c8750d2acb9821d78bc8646">sf::SoundStream::setPlayingOffset</a></div><div class="ttdeci">void setPlayingOffset(Time timeOffset)</div><div class="ttdoc">Change the current playing position of the stream.</div></div>
<div class="ttc" id="aclasssf_1_1SoundStream_html_afdc08b69cab5f243d9324940a85a1144"><div class="ttname"><a href="classsf_1_1SoundStream.html#afdc08b69cab5f243d9324940a85a1144">sf::SoundStream::play</a></div><div class="ttdeci">void play()</div><div class="ttdoc">Start or resume playing the audio stream.</div></div>
<div class="ttc" id="aclasssf_1_1Thread_html"><div class="ttname"><a href="classsf_1_1Thread.html">sf::Thread</a></div><div class="ttdoc">Utility class to manipulate threads.</div><div class="ttdef"><b>Definition</b> <a href="Thread_8hpp_source.html#l00048">Thread.hpp:49</a></div></div>
<div class="ttc" id="aclasssf_1_1Time_html"><div class="ttname"><a href="classsf_1_1Time.html">sf::Time</a></div><div class="ttdoc">Represents a time value.</div><div class="ttdef"><b>Definition</b> <a href="Time_8hpp_source.html#l00040">Time.hpp:41</a></div></div>
<div class="ttc" id="astructsf_1_1SoundStream_1_1Chunk_html"><div class="ttname"><a href="structsf_1_1SoundStream_1_1Chunk.html">sf::SoundStream::Chunk</a></div><div class="ttdoc">Structure defining a chunk of audio data to stream.</div><div class="ttdef"><b>Definition</b> <a href="SoundStream_8hpp_source.html#l00053">SoundStream.hpp:54</a></div></div>
<div class="ttc" id="astructsf_1_1SoundStream_1_1Chunk_html_aa3b84d69adbe663a17a7671626076df4"><div class="ttname"><a href="structsf_1_1SoundStream_1_1Chunk.html#aa3b84d69adbe663a17a7671626076df4">sf::SoundStream::Chunk::samples</a></div><div class="ttdeci">const Int16 * samples</div><div class="ttdoc">Pointer to the audio samples.</div><div class="ttdef"><b>Definition</b> <a href="SoundStream_8hpp_source.html#l00055">SoundStream.hpp:55</a></div></div>
<div class="ttc" id="astructsf_1_1SoundStream_1_1Chunk_html_af47f5d94012acf8b11f056ba77aff97a"><div class="ttname"><a href="structsf_1_1SoundStream_1_1Chunk.html#af47f5d94012acf8b11f056ba77aff97a">sf::SoundStream::Chunk::sampleCount</a></div><div class="ttdeci">std::size_t sampleCount</div><div class="ttdoc">Number of samples pointed by Samples.</div><div class="ttdef"><b>Definition</b> <a href="SoundStream_8hpp_source.html#l00056">SoundStream.hpp:56</a></div></div>
</div><!-- fragment --></div><!-- contents -->
        </div>
        <div id="footer-container">
            <div id="footer">
                SFML is licensed under the terms and conditions of the <a href="https://www.sfml-dev.org/license.php">zlib/png license</a>.<br>
                Copyright &copy; Laurent Gomila &nbsp;::&nbsp;
                Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> &nbsp;::&nbsp;
            </div>
        </div>
    </body>
</html>
